home *** CD-ROM | disk | FTP | other *** search
- global oDrawStage, oOrbitCenter, oOrbitNodes, oOrbitButtons, oRollText, oExitButton, oBackButton, gMouseState, gPrevMouseLoc, oStoneRects, oDoor, oStones, gSubNavState, oLetters, gPrevMill, pGovTicks, gFPS, oMusicButton, wMusic, gCloseWinFlag
-
- on exitFrame me
- gFPS = float(1000) / float(the milliSeconds - gPrevMill)
- gPrevMill = the milliSeconds
- if gFPS > 45 then
- pGovTicks = pGovTicks + 1
- if pGovTicks > 22 then
- pGovTicks = 0
- end if
- else
- pGovTicks = 0
- end if
- if (pGovTicks = 0) and (wMusic <> window("soundtrack")) then
- repeat with i = 1 to count(oOrbitNodes)
- moveNodes(oOrbitNodes[i])
- end repeat
- if oOrbitCenter <> EMPTY then
- moveOrbitCenter(oOrbitCenter)
- end if
- if oRollText <> EMPTY then
- blendRollText(oRollText)
- end if
- gMouseState = isMouseMoving()
- gPrevMouseLoc = the mouseLoc
- repeat with i = 1 to count(oStones)
- checkStone(oStones[i])
- end repeat
- if gMouseState <> 2 then
- if oBackButton <> EMPTY then
- checkBack(oBackButton)
- end if
- if oExitButton <> EMPTY then
- checkExit(oExitButton)
- end if
- if oMusicButton <> EMPTY then
- checkMusicButton(oMusicButton)
- end if
- if oDoor <> EMPTY then
- checkDoor(oDoor)
- end if
- end if
- repeat with i = 1 to count(oLetters)
- oLetters[i].moveLetter()
- end repeat
- if gSubNavState = 1 then
- repeat with i = 1 to 3
- createLetters()
- end repeat
- end if
- oDrawStage.mainLoop()
- end if
- if gCloseWinFlag = 1 then
- setUpAudio()
- oDrawStage.pPunchFlag = 0
- gCloseWinFlag = 0
- end if
- go(the frame)
- end
-